package com.association.config;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
import org.springframework.util.StringUtils;

/**
 * @Description:
 * @Auther: xq
 * @Date: 2020/3/14/014 16:58
 * @Version: 1.0
 */
public class CacheCloudConditionExtend implements  Condition {

    public CacheCloudConditionExtend(){

    }
    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
        String appid = conditionContext.getEnvironment().getProperty("cachecloud.appid3");
        return !StringUtils.isEmpty(appid);
    }
}
